package test.App.day06;

public class Student {
    private String name;
    private char sex;
    private int age;
    private String SchoolName;

    public Student() {

    }

    public Student(String name, char sex, int age) {
        // super() 和 this() 都必须在构造器的第一行，且两者不能同时使用
       this(name,sex, age,"西安邮电大学");
    }

    public Student(String name, char sex, int age, String schoolName) {
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.SchoolName = schoolName;
    }


    public String getName() {
        return name;
    }



    public void setName(String name) {
        this.name = name;
    }

    public char getSex() {
        return sex;
    }

    public void setSex(char sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSchoolName() {
        return SchoolName;
    }

    public void setSchoolName(String schoolName) {
        SchoolName = schoolName;
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
